const HtmlWebpackPlugin = require('html-webpack-plugin')
const {
    VueLoaderPlugin
} = require('vue-loader')

module.exports = {
    mode: 'development',
    entry: {
        index: './src/index.js'
    },
    module: {
        rules: [{
            test: /\.js$/,
            use: ['babel-loader'],
        }, {
            test: /\.css$/,
            use: ['vue-style-loader', 'css-loader']
        }, {
            test: /\.less$/,
            use: ['vue-style-loader', 'css-loader', 'less-loader']
        }, {
            test: /\.vue$/,
            use: ['vue-loader'],
        }]
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: './src/index.html',
        }),
        new VueLoaderPlugin(),
    ]
}